{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
    <link href="{% static 'css/base.css' %}" rel="stylesheet" type="text/css" media="all" />
    <link href="{% static 'css/master.css' %}" rel="stylesheet" type="text/css" media="all" />
    <script src="{% static "js/changepage.js" %}" type="text/javascript"></script>
    <title>个性化新闻推荐网站</title>
</head>
    <body>
    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>head</title>
    </head>

    <body>
    <script type="text/javascript">
    //得到焦点触发事件
    function OnfocusFun(element,elementvalue)
    {
        if(element.value==elementvalue)
        {
            element.value="";
            element.style.color="#000";
        }
    }
    //离开输入框触发事件
    function OnBlurFun(element,elementvalue)
    {
        if(element.value==""||element.value.replace(/\s/g,"")=="")
        {
            element.value=elementvalue;
            element.style.color="#000";
        }
    }
    </script>
    <!--内容-->
    <div class="top">
       <dl>
          <dt>欢迎来到新闻推荐网！</dt>
           {%if not request.user.is_authenticated %}
          <dd><a href="{% url 'newsrecommand:login'%}">登录</a></dd>
          <dd><a href="{% url 'newsrecommand:register' %}">注册</a></dd>
           {% else %}
          <dd><a href="{% url 'newsrecommand:logout' %}">登出</a></dd>
          <dd style="color: #ffffff">欢迎你！{{ request.user }}</dd>
            {% endif %}
       </dl>
    </div>
    <div class="header">
       <div class="logo"><img src="{% static '/image/logo.jpg' %}"></div>
       <div class="search">

       <form  action="{% url 'newsrecommand:search'%}" method="post">
            <table width="100%" border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td><input type="text" name="searchtext" class="search_inps" onfocus="OnfocusFun(this,'请输入关键词')" onblur="OnBlurFun(this,'请输入关键词')" value="请输入关键词"></td>
              <td align="right"><input name="" type="submit" class="search_btn" value=""></td>
            </tr>
          </table>
       </form>
       </div>
    </div>
    <!-- 头部结束 -->
    <!-- 导航开始 -->
    <div class="menu">
      <ul>
         <li><a href="{% url 'newsrecommand:index' %}" class="menu_on">首页</a></li>
         <li><a href="{% url 'newsrecommand:type' 1 %}">论文专利</a></li>
         <li><a href="{% url 'newsrecommand:type' 2 %}">校园活动</a></li>
         <li><a href="{% url 'newsrecommand:type' 3 %}">大赛通知</a></li>
         <li><a href="{% url 'newsrecommand:type' 4 %}">工作安排</a></li>
         <li><a href="{% url 'newsrecommand:type' 5 %}">讲座会议</a></li>
      </ul>
    </div>
    <!-- 导航结束 -->
            {% block content %}
            {% endblock %}
        <div class="footer">版权所有© 如果有的话</div>
</body>
</html>